package com.ly.ymall.usermanager.controller;

import com.ly.ymall.pojo.UserInfo;
import com.ly.ymall.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("userInfo")
public class UserInfoController {

    @Autowired
    private UserInfoService userInfoService;

    @RequestMapping("/getUserById")
    public UserInfo getUserById(@RequestParam int id){
        UserInfo userInfo = userInfoService.getUserInfoById(id);
        return userInfo;
    }
}
